<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="./lib/echarts.min.js"></script>
    <div style="width: 500px; height : 400px;"></div>
    <script>
        // 格式化echarts
        let myChart = echarts.init(document.querySelector('div'));
        // 创建一个配置对象
        let option = {
            xAxis: {
                type: 'category',
                data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    data: [820, 932, 901, 934, 1290, 1330, 1320],
                    type: 'line',
                    smooth: true
                }
            ]
        };
        // 找官方示例的代码 替换自己的option配置项 创建图表
        myChart.setOption(option);
    </script>
</body>

</html>